CES Help Document > Discord Bots > Discord Status Bot with Role Ping
Discord Status Bot with Role Ping
What This Bot Does
The CES Discord Status Bot with Role Ping allows staff to use slash commands to:
- Update a team's open/closed status
- Update commission status and lead time
- Automatically ping the correct role
- Reuse and edit previous status messages (instead of spamming new ones)
Features
- βοΈ Slash-based input for updates
- π Edits previously sent messages using
message_map.json
- π Pings specific roles (Team or Commission) based on command used
- π Stores default statuses in
config.json
Setup Instructions
- Edit the
.env
File
The .env
file is already included in the download.
Just open it and update your bot token:
DISCORD_TOKEN=your_actual_token_here
2. Update bot.js
Role IDs
In bot.js
, update the following lines:
const TEAM_ROLE_ID = "YOUR_TEAM_ROLE_ID";
const COMMISSION_ROLE_ID = "YOUR_COMMISSION_ROLE_ID";
These roles will be pinged during updates.
3. Customize config.json
This file contains the default status values:
{
"teamStatus": {
"Management": "Open",
"Development Team": "Open",
"Support Team": "Open",
"Partnerships": "Closed",
"Testers": "Open",
"Application Team": "Open"
},
"commissionStatus": {
"EUP Retexture": {
"status": "Open",
"leadTime": "7-10 Days"
},
"Vehicle Liveries": {
"status": "Open",
"leadTime": "3-4 Days"
},
"Custom Flags/Billboards": {
"status": "Open",
"leadTime": "3 Days"
},
"Sonoran CAD Report": {
"status": "Open",
"leadTime": "3 Days"
}
}
}
- Feel free to adjust the positions or time estimates.
- You can freely change these values.
4. message_map.json β Message Tracking
This file stores the last message/channel ID used for each status update, so the bot can edit instead of reposting:
{
"open_positions": {
"channelId": "",
"messageId": ""
},
"commission_status": {
"channelId": "",
"messageId": ""
}
}
- No need to modify it manually β it will be updated automatically after first use.
Slash Commands
- /set_team_status Update any team's status.
Example:
/set_team_status name:Support Team status:Closed
- Pings the Team Role.
- /set_commission_status Update a commission projectβs status and lead time.
Example:
/set_commission_status name:Vehicle Liveries status:In Progress lead_time:4-5 Days
- Pings the Commission Role.
Run the Bot
- Install dependencies:
npm install
2. Launch the bot:
node bot.js
- This will also register your slash commands.
Required Permissions
Step 1: Invite the Bot
If you havenβt already invited the bot, use your custom bot invite URL or generate one with these OAuth2 permissions:
- applications.commands
- bot
- Minimum Bot Permissions:
β Send Messages
β Embed Links
β Read Message History
β Use Slash Commands
β Mention @everyone, @here, and All Roles
β Manage Messages (optional, if using message edits)
β Manage Channels (only if needed to rename channels β not required for this bot)
Review this page